package cn.hongxin.sap.conn.client;

import cn.getech.poros.framework.common.api.RestResponse;
import cn.hongxin.sap.conn.dto.DemoDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotEmpty;


/**
 * @author hengji.li@getech.cn
 * @date 2020/3/3
 */
@FeignClient(name = "sap-interface-svc" , path = "/")
@Validated
public interface DemoServiceClient {

    /**
     * demo sayHello
     * @param name
     *
     * @return RestResponse<String>
     */
    @GetMapping(value = "/demo/hello")
    RestResponse<DemoDto> apiHello(@RequestParam @NotEmpty String name);
}
